Repository navigation
Conversation
…not served stale A transform that fails before finding the component's templateUrl prunes the component's claim on its template, so handleHotUpdate then treats an edit to that template as a stranger's and leaves its old contents in resourceCache; once the component compiles again, it is compiled with the old template, until the dev server restarts. handleHotUpdate now drops a changed file's cache entry whatever its role (also with liveReload off).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a component's
.tsfails to compile, its transform finds notemplateUrl, and the transform's pruning drops the component's claim on its template. An edit to that template is then not recognised as a component resource inhandleHotUpdate, soresourceCachekeeps the old contents. Once the component compiles again, it is compiled with the old template until the dev server restarts:handleHotUpdatenow drops a changed file's cache entry first, whatever its role, and also withliveReload: false. A path's cached contents are stale once the file changed, whoever owns it.The new test in
test/hmr-hot-update.test.tsruns that sequence and fails without the change. All 377 plugin tests pass. We found it with a browser test of a real app.